<#function resolveTsType field>
  <#assign javaType = (field.fieldClass!"String")?lower_case>
  <#if javaType?contains("bigdecimal") || javaType?contains("decimal") || javaType?contains("double") || javaType?contains("float")>
    <#return "number">
  <#elseif javaType?contains("long") || javaType?contains("int") || javaType?contains("short") || javaType?contains("byte")>
    <#return "number">
  <#elseif javaType?contains("bool")>
    <#return "boolean">
  <#elseif javaType?contains("localdatetime") || javaType?contains("timestamp") || javaType?contains("localdate") || javaType?contains("date")>
    <#return "string">
  <#else>
    <#return "string">
  </#if>
</#function>

export interface ${classInfo.className} {
<#list classInfo.fieldList as field>
  ${field.fieldName}?: ${resolveTsType(field)};
</#list>
}

export type ${classInfo.className}PrimaryKey = ${resolveTsType(classInfo.fieldList?first)};

export type ${classInfo.className}CreateInput = {
<#list classInfo.fieldList as field>
  <#if field.fieldName != options.primaryFieldName?default(classInfo.fieldList[0].fieldName)>
  ${field.fieldName}?: ${resolveTsType(field)};
  </#if>
</#list>
};

export type ${classInfo.className}UpdateInput = ${classInfo.className}CreateInput;

